{% extends "base.html" %}
	{% block title %}
    <title>留言本</title>
    {% endblock %}

    {% block content %}    
      <body  bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="margin: 0" >
	  <table width="100%" height="61%" border="0" cellpadding="0" cellspacing="0">
  
  <tr>
    <td> <br>

	    <table   align="center" cellspacing="0" class="table-90">
        <tr><td>

</td></tr>
        <tr><td class="1-td1">新建留言：<a href="{%url actions.guestbook.gbaction.new%}">新建</a></td></tr>
       
	   
	   <tr>
          <td class="1-td2">
 

<br>

	  <table align="center" cellspacing="0" class="table-99">
	  <tr>

                <td width="100%" colspan="5" class="2-td1-left">
   <div align="right">
				
            |    <a href="?offset=1">第一页</a>
           {% if greetings.has_previous %}
            |    <a href="?offset={{ greetings.previous_page_number }}">上一页</a>
            {% endif %}


            {% if greetings.has_next %}
               | <a href="?offset={{ greetings.next_page_number }}">下一页</a>
            {% endif %}
            |    <a href="?offset={{ greetings.paginator.num_pages }}">最末页</a>
            <span >
&nbsp;&nbsp;&nbsp;              |  当前页：{{ greetings.number }}  总页数：{{ greetings.paginator.num_pages }}
            </span>

			|
    </div>

                </td>
              </tr>

		<tr>
                <td width="10%" class="2-td1-left">用户ID</td>
                <td width="10%" class="2-td1-center">EMail</td>
                <td width="15%" class="2-td1-center">日期</td>
                <td width="60%" class="2-td1-center">
                  内容
                </td>
                <td width="5%" class="2-td1-center">&nbsp;
                </td>
              </tr>



    {% for greeting in greetings.object_list %}
	  <tr>
      {% if greeting.author %}
        <td class="2-td2-left">&nbsp;<b>{{ greeting.author.nickname }}</b> </td>
      {% else %}
       <td class="2-td2-left">&nbsp;</td>
      {% endif %}
      <td class="2-td2-center">&nbsp;{{ greeting.email|escape }}</td>
	  <td class="2-td2-center">&nbsp;{{greeting.created|date:"Y/m/d H:i:s"}}</td>
      <td class="2-td2-center">&nbsp;<blockquote>{{ greeting.content|escape }}</blockquote></td>
<!--      {% ifequal greeting.author.nickname  "gzxadmin@example.com" %}
	  <td class="2-td2-center">&nbsp;<a href="{%url gbviews.edit greeting.key.id%}">修改޸</a></td>
      {% else %}
       <td class="2-td2-center">&nbsp;</td>
      {% endifequal %}-->
	  <td class="2-td2-center">&nbsp;<a href="{%url actions.guestbook.gbaction.edit greeting.key.id%}">修改޸</a></td>

	  </tr>
    {% endfor %}

       </table>
  

       <br>
          </td>
        </tr>
      </table>

     <br>
          </td>
        </tr>

  

			       </table>

    {% endblock %}
